import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "../views/Index/index.vue"
import Home from "../views/Home/index.vue"
import Class from "../views/Class/index.vue"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: "/index/home"
  },
  {
    path: '/index',
    name: 'Index',
    component: Index,
    children: [
      {
        path: '/index/home',
        name: 'Home',
        component: Home,
      },
      {
        path: '/index/class',
        name: 'Class',
        component: Class,
      },
      
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
